// pages/messages/messages.js
Page({
  data: {
    messages: [
      { id: 1, title: '系统通知', time: '2025-7-01 10:00' },
      { id: 2, title: '新消息提醒', time: '2025-7-01 11:00' },
      { id: 3, title: '活动通知', time: '2025-7-01 12:00' }
    ]
  },

  onMessageTap: function (e) {
    const id = e.currentTarget.dataset.id;
    wx.navigateTo({
      url: `/pages/detail/detail?id=${id}`
    });
  }
});